Function at 0x40e990
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4ac
mov eax, dword [0x453348]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [ebp - 0x4a0], esi
mov dword [ebp - 0x49c], ebx
cmp dword [0x4571fc], ebx
jne 0x40ea3c
push 1
push ebx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x424]
mov dword [ebp - 0x49c], 1
mov dword [ebp - 0x410], 0xf
mov dword [ebp - 0x414], ebx
mov byte [ebp - 0x424], bl
call fcn.00401e30
mov edi, dword [ebp - 0x414]
mov eax, edi
cmp edi, 1
jb 0x40ea01
lea eax, [ebx + 1]
cmp dword [ebp - 0x410], 0x10
mov edx, dword [ebp - 0x424]
jae 0x40ea16
lea edx, [ebp - 0x424]
mov ecx, 0x44f664
call fcn.00401060
cmp eax, ebx
jne 0x40ea3c
cmp edi, 1
jb 0x40ea3c
xor eax, eax
cmp edi, 1
setne al
mov byte [ebp - 0x495], 1
cmp eax, ebx
je 0x40ea42
mov byte [ebp - 0x495], bl
test byte [ebp - 0x49c], 1
mov edi, 0x10
je 0x40ea7d
cmp dword [ebp - 0x410], edi
jb 0x40ea67
mov ecx, dword [ebp - 0x424]
push ecx
call fcn.0041d1cc
add esp, 4
mov dword [ebp - 0x410], 0xf
mov dword [ebp - 0x414], ebx
mov byte [ebp - 0x424], bl
cmp byte [ebp - 0x495], bl
je 0x40eac2
push ebx
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
push 0x44dbd8
mov ecx, esi
mov byte [esi], bl
call fcn.00401bb0
cmp dword [ebp + 0x20], edi
jb 0x40eaaf
mov edx, dword [ebp + 0xc]
push edx
call fcn.0041d1cc
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c2f8
mov esp, ebp
pop ebp
ret
cmp dword [0x4571fc], ebx
jne 0x40ed1f
cmp byte [0x459c04], bl
jne 0x40eb0a
call fcn.0040f090
mov edi, dword [0x459bf0]
cmp edi, ebx
je 0x40eb01
mov eax, dword [0x459bfc]
cmp eax, ebx
je 0x40eb01
mov esi, eax
mov dword [0x4572d0], edi
call fcn.00418e20
mov esi, dword [ebp - 0x4a0]
mov byte [0x459c04], 1
jmp 0x40eb10
mov edi, dword [0x459bf0]
cmp edi, ebx
je 0x40eb1f
push 1
push edi
call fcn.0040f2c0
add esp, 8
push 0x10
mov edi, 0xf
push str..pipeServer1
lea ecx, [ebp - 0x440]
mov dword [ebp - 0x42c], edi
mov dword [ebp - 0x430], ebx
mov byte [ebp - 0x440], bl
call fcn.00401bb0
cmp dword [ebp - 0x42c], 0x10
mov eax, dword [ebp - 0x440]
jae 0x40eb5d
lea eax, [ebp - 0x440]
push ebx
push ebx
push 0x200
push 0x200
push 0xff
push 6
push 3
push eax
call dword [0x4572bc]
push ebx
push eax
mov dword [0x4571fc], eax
call dword [0x457250]
test eax, eax
jne 0x40ec17
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0x217
sete cl
cmp ecx, ebx
jne 0x40ec17
mov edx, dword [0x4571fc]
push edx
call dword [0x4572b4]
push ebx
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
push 0x44dbd8
mov ecx, esi
mov byte [esi], bl
call fcn.00401bb0
cmp dword [ebp - 0x42c], 0x10
jb 0x40ebdc
mov eax, dword [ebp - 0x440]
push eax
call fcn.0041d1cc
add esp, 4
cmp dword [ebp + 0x20], 0x10
mov dword [ebp - 0x42c], edi
mov dword [ebp - 0x430], ebx
mov byte [ebp - 0x440], bl
jb 0x40eaaf
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0041d1cc
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c2f8
mov esp, ebp
pop ebp
ret
sub esp, 0x1c
mov ecx, esp
push 1
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push 0x44f67c
mov byte [0x459c00], 1
mov byte [ecx], bl
call fcn.00401bb0
lea edx, [ebp - 0x424]
push edx
call fcn.0040e990
add esp, 0x20
mov edi, eax
mov esi, 0x455f70
call fcn.00401900
mov esi, 0x10
cmp dword [ebp - 0x410], esi
jb 0x40ec6e
mov eax, dword [ebp - 0x424]
push eax
call fcn.0041d1cc
add esp, 4
mov eax, dword [0x455f70]
mov edi, 0xf
mov dword [ebp - 0x410], edi
mov dword [ebp - 0x414], ebx
mov byte [ebp - 0x424], bl
cmp dword [0x455f84], esi
jae 0x40ec97
mov eax, 0x455f70
push eax
push 1
push ebx
call dword [0x457248]
sub esp, 0x1c
mov ecx, esp
push 0xffffffffffffffff
push ebx
lea edx, [ebp + 0xc]
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push edx
mov dword [0x4571ec], eax
mov byte [ecx], bl
call fcn.00401e30
mov edi, dword [ebp - 0x4a0]
push edi
call fcn.0040e990
add esp, 0x20
cmp dword [ebp - 0x42c], esi
jb 0x40ece5
mov eax, dword [ebp - 0x440]
push eax
call fcn.0041d1cc
add esp, 4
mov dword [ebp - 0x42c], 0xf
mov dword [ebp - 0x430], ebx
mov byte [ebp - 0x440], bl
cmp dword [ebp + 0x20], esi
jb 0x40ed0c
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0041d1cc
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c2f8
mov esp, ebp
pop ebp
ret
cmp byte [0x459c00], bl
je 0x40edd1
mov byte [0x459c00], bl
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x410], 0xf
mov dword [ebp - 0x414], ebx
mov byte [ebp - 0x424], bl
cmp dword [ebp + 0x20], edi
jae 0x40ed52
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x408]
push ecx
call fcn.0041d551
lea eax, [ebp - 0x408]
add esp, 8
lea edx, [eax + 1]
jmp 0x40ed70
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40ed70
mov ecx, dword [0x4571fc]
sub eax, edx
push ebx
lea edx, [ebp - 0x4ac]
push edx
inc eax
push eax
lea eax, [ebp - 0x408]
push eax
push ecx
call dword [0x4572a4]
test eax, eax
jne 0x40ee42
push 0x44dbd8
mov ecx, esi
call fcn.00401820
lea ecx, [ebp - 0x424]
call fcn.00401880
lea ecx, [ebp + 0xc]
call fcn.00401880
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c2f8
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4571ec]
cmp eax, ebx
je 0x40edee
push 0xa
push eax
call dword [0x45726c]
cmp eax, 0x102
je 0x40ed31
sub esp, 0x1c
mov ecx, esp
push 0xffffffffffffffff
push ebx
lea edx, [ebp + 0xc]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push edx
mov dword [0x4571fc], ebx
mov byte [ecx], bl
call fcn.00401e30
push esi
call fcn.0040e990
add esp, 0x20
cmp dword [ebp + 0x20], edi
jb 0x40eaaf
mov eax, dword [ebp + 0xc]
push eax
call fcn.0041d1cc
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c2f8
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x4571fc]
push ebx
lea edx, [ebp - 0x4a8]
push edx
push 0x200
lea eax, [ebp - 0x208]
push eax
push ecx
call dword [0x457264]
test eax, eax
je 0x40f013
mov ecx, dword [ebp - 0x4a8]
cmp ecx, 4
jbe 0x40f013
mov eax, dword [ebp - 0x208]
mov dword [ebp - 0x4a4], eax
cmp eax, ebx
jle 0x40efc5
mov eax, 0x1fc
lea ecx, [ebp - 0x204]
lea esi, [ebp - 0x478]
mov dword [ebp - 0x42c], 0xf
mov dword [ebp - 0x430], ebx
mov byte [ebp - 0x440], bl
call fcn.0040f890
mov edi, eax
lea esi, [ebp - 0x440]
call fcn.00401900
lea ecx, [ebp - 0x478]
call fcn.00401880
mov esi, dword [ebp - 0x4a4]
mov edi, 1
cmp esi, edi
jl 0x40efa8
lea edx, [esi - 1]
mov dword [ebp - 0x49c], edx
mov edi, edi
mov edx, dword [0x4571fc]
push ebx
lea eax, [ebp - 0x4a8]
push eax
push 0x200
lea ecx, [ebp - 0x208]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x49c]
cmp dword [ebp - 0x208], eax
je 0x40ef32
lea ecx, [ebp - 0x424]
push ecx
mov edx, str.Data_was_big._Some_error_happened_in_transferring_
call fcn.0040f8f0
jmp 0x40ef99
lea ecx, [ebp - 0x204]
cmp edi, esi
jne 0x40ef68
mov eax, dword [ebp - 0x4a8]
add eax, 0xfffffffc
lea esi, [ebp - 0x494]
call fcn.0040f890
push ebx
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x440]
call fcn.00414380
lea ecx, [ebp - 0x494]
jmp 0x40ef8e
mov eax, 0x1fc
lea esi, [ebp - 0x45c]
call fcn.0040f890
push ebx
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x440]
call fcn.00414380
lea ecx, [ebp - 0x45c]
call fcn.00401880
mov esi, dword [ebp - 0x4a4]
dec dword [ebp - 0x49c]
inc edi
cmp edi, esi
jle 0x40eef0
push 0xffffffffffffffff
push ebx
lea edx, [ebp - 0x440]
push edx
lea ecx, [ebp - 0x424]
call fcn.00401e30
lea ecx, [ebp - 0x440]
jmp 0x40efec
lea eax, [ecx - 4]
lea ecx, [ebp - 0x204]
lea esi, [ebp - 0x45c]
call fcn.0040f890
mov edi, eax
lea esi, [ebp - 0x424]
call fcn.00401900
lea ecx, [ebp - 0x45c]
call fcn.00401880
mov esi, dword [ebp - 0x4a0]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
lea edi, [ebp - 0x424]
mov byte [esi], bl
call fcn.00401900
jmp 0x40edab
push ebx
push 0x44dbd8
lea ecx, [ebp - 0x424]
call fcn.00401bb0
lea ecx, [ebp - 0x424]
call fcn.00401880
lea ecx, [ebp + 0xc]
call fcn.00401880
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041c2f8
mov esp, ebp
pop ebp
ret