Function at 0x409970
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4687cb
mov eax, dword fs:[0]
push eax
sub esp, 0x84
push ebx
push esi
push edi
mov eax, dword [0x48b270]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x5c], ecx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x34]
mov esi, dword [eax + 0x44]
mov ecx, dword [ebp + 0x10]
xor edi, edi
mov dword [ebp - 0x2c], esi
mov dword [ecx], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x28], edi
mov ecx, dword [esi + 0x64]
xor eax, eax
mov dword [ebp - 4], edi
cmp eax, edi
ja 0x4099e3
jb 0x4099cd
cmp ecx, 0xffffffff
ja 0x4099e3
push ecx
call fcn.0045306c
mov edi, eax
add esp, 4
mov dword [ebp - 0x28], edi
test edi, edi
jne 0x409a78
call fcn.00432e51
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x4099fd
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp + 8]
push str.CW3MFCCGI::ReadFromClientStdout__Failed_to_allocate_transmit_buffer__Error:_d
push ecx
call fcn.00401f50
mov ecx, dword [ebx + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [ebp + 8]
push eax
call edx
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409a59
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call fcn.00452c6a
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, 1
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x3c], 0
je 0x409fdb
mov edx, dword [esi + 0x64]
mov eax, dword [ebp + 0xc]
push 0
lea ecx, [ebp - 0x20]
push ecx
dec edx
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409fcf
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x409fcf
add dword [ebp - 0x40], eax
lea ecx, [ebp - 0x6c]
call fcn.00415050
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 2
call fcn.00415040
xor eax, eax
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x44], eax
je 0x409efe
cmp dword [ebp + 0x14], eax
jne 0x409efe
mov ecx, dword [ebp - 0x20]
push str._r_n_r_n
push edi
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x44], eax
mov byte [ecx + edi], al
call fcn.004536b0
lea edx, [eax + 4]
mov dword [ebp - 0x54], edx
xor edx, edx
xor ecx, ecx
add esp, 8
cmp eax, ecx
setne dl
mov dword [ebp - 0x50], eax
mov eax, edx
cmp eax, ecx
je 0x409eb6
push 0x46f89c
push edi
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x48], ecx
mov ebx, edi
call fcn.004536b0
add esp, 8
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], 1
call fcn.004383ae
mov byte [ebp - 4], 3
call fcn.00432e51
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4099f3
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x30]
mov byte [ebp - 4], 4
test eax, eax
je 0x409d94
mov esi, eax
sub esi, ebx
push esi
call fcn.004318d6
lea ecx, [esi - 1]
push ecx
push ebx
mov edi, eax
push esi
push edi
call fcn.004535f6
add esp, 0x14
mov byte [edi + esi - 1], 0
test edi, edi
jne 0x409baf
xor eax, eax
jmp 0x409bbd
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409bb4
sub eax, edx
push eax
push edi
lea ecx, [ebp - 0x14]
call fcn.00401b90
push edi
call fcn.004318cb
mov edx, dword [ebp - 0x14]
add esp, 4
cmp dword [edx - 0xc], 0
je 0x409d81
call fcn.00432e51
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4099f3
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 5
call fcn.00432e51
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4099f3
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x14]
push eax
mov byte [ebp - 4], 6
call fcn.00416150
add esp, 0xc
test eax, eax
je 0x409d3b
mov ecx, dword [ebp - 0x18]
push str.Connection
push ecx
call fcn.00453abe
add esp, 8
test eax, eax
jne 0x409c84
push str.Keep_Alive
lea ecx, [ebp - 0x24]
call fcn.00409270
test eax, eax
jne 0x409c84
mov eax, dword [ebp - 0x88]
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x48], 1
push eax
jmp 0x409d30
cmp dword [ebp - 0x48], 0
je 0x409cb4
push str.Content_Length
lea ecx, [ebp - 0x18]
call fcn.00409270
test eax, eax
jne 0x409cb4
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x88]
lea edx, [ebp - 0x14]
push edx
mov dword [ecx], 1
push eax
jmp 0x409d30
push str.Status
lea ecx, [ebp - 0x18]
call fcn.00409270
test eax, eax
jne 0x409cd6
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.004535eb
add esp, 4
mov dword [ebp - 0x1c], eax
jmp 0x409d3b
push str.Location
lea ecx, [ebp - 0x18]
call fcn.00409270
test eax, eax
jne 0x409d00
cmp dword [ebp - 0x1c], eax
jne 0x409cf3
mov dword [ebp - 0x1c], 0x12e
mov eax, dword [ebp - 0x88]
lea edx, [ebp - 0x14]
push edx
push eax
jmp 0x409d30
push str.Server
lea ecx, [ebp - 0x18]
call fcn.00409270
test eax, eax
jne 0x409d25
mov edx, dword [ebp - 0x88]
lea ecx, [ebp - 0x14]
push ecx
mov dword [ebp - 0x4c], 1
push edx
jmp 0x409d30
mov ecx, dword [ebp - 0x88]
lea eax, [ebp - 0x14]
push eax
push ecx
lea ecx, [ebp - 0x90]
call fcn.00438684
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409d5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409d81
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x30]
inc ebx
cmp ebx, dword [ebp - 0x50]
jb 0x409e94
mov edi, dword [ebp - 0x28]
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409dbe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x34], 0
jne 0x409b55
cmp dword [ebp - 0x1c], 0
jne 0x409dd5
mov dword [ebp - 0x1c], 0xc8
mov ecx, dword [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x6c]
call fcn.00415250
cmp dword [ebp - 0x4c], 0
jne 0x409df3
mov eax, dword [esi + 0x2c]
push eax
lea ecx, [ebp - 0x6c]
call fcn.00415d50
mov eax, dword [ebp - 0x88]
xor esi, esi
test eax, eax
jle 0x409e68
nop
test esi, esi
jl 0x409eb1
cmp esi, eax
jge 0x409eb1
mov edx, dword [ebp - 0x8c]
lea eax, [edx + esi*4]
push 0x46f1f0
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00401d80
add esp, 0xc
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 7
call fcn.00415210
mov eax, dword [ebp - 0x60]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e5d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x88]
inc esi
cmp esi, eax
jl 0x409e00
mov edx, dword [ebp - 0x20]
mov ecx, edi
sub ecx, dword [ebp - 0x50]
mov byte [ebp - 4], 2
lea eax, [edx + ecx - 4]
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x4c], ecx
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x20], eax
call fcn.0043858b
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 0x2c]
jmp 0x409efe
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x54]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
push eax
push ebx
call edx
mov edi, dword [ebp - 0x28]
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
jmp 0x409d9b
call fcn.00431a0d
push 0xc8
lea ecx, [ebp - 0x6c]
call fcn.00415250
lea edx, [ebp - 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x6c]
call fcn.004155d0
mov eax, dword [esi + 0x2c]
push eax
lea ecx, [ebp - 0x6c]
call fcn.00415d50
mov ecx, dword [esi + 0x60]
push ecx
lea ecx, [ebp - 0x6c]
call fcn.004155a0
push str.text_plain
lea ecx, [ebp - 0x6c]
call fcn.00415970
cmp dword [ebp - 0x58], 0
mov byte [ebp - 4], 8
je 0x409f1b
mov edx, dword [esi + 0x44]
push edx
lea eax, [ebx + 0xf8]
push eax
lea ecx, [ebp - 0x6c]
call fcn.00415e40
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x409f36
mov ecx, dword [esi + 0x44]
mov edx, dword [ebp - 0x4c]
push ecx
push eax
push edx
lea ecx, [ebx + 0xf8]
call fcn.00415ef0
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x6c]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409a86
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x409a86
mov dword [ebp - 0x3c], 0
jmp 0x409a86
push edi
call fcn.00452c6a
mov eax, dword [ebp - 0x40]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10