Function at 0x10049784
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], ebx
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
mov dword [ebp - 4], eax
lea edx, [ebp - 0x14]
push 4
push edi
push edx
push ebx
call fcn.10026824
add esp, 0x10
test eax, eax
je 0x100497e0
movzx edx, byte [ebp + 0x10]
test dl, 1
je 0x100497cf
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
movzx eax, ax
mov esp, ebp
pop ebp
ret
push 0x100b600c
push ebx
push 2
push eax
call fcn.100149ac
add esp, 0x10
mov eax, dword [ebp - 0x14]
movzx ebx, byte [ebp + 0x10]
movzx ecx, byte [eax + 0x12b]
and ecx, 0xffffffbf
and ebx, 1
shl ebx, 6
or ecx, ebx
mov byte [eax + 0x12b], cl
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ebp + 0x10]
movzx edx, byte [ecx + 0x12b]
and edx, 0x7f
and eax, 2
shr eax, 1
and eax, 1
shl eax, 7
or edx, eax
mov byte [ecx + 0x12b], dl
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ebp + 0x13]
movzx eax, byte [ecx + 0x12f]
and eax, 0xfffffffe
and edx, 2
shr edx, 1
and edx, 1
or eax, edx
mov byte [ecx + 0x12f], al
movzx eax, byte [ebp + 0x13]
test eax, 0x80
je 0x1004985c
lea eax, [ebp + 0x27]
and eax, 0xfffffffc
mov edx, dword [eax]
mov dword [ebp - 0x18], edx
jmp 0x10049861
xor eax, eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [eax + 0xf0], 0
mov ebx, dword [ebp - 0x14]
movzx eax, byte [ebx + 0x129]
test al, 0x20
je 0x10049f20
test al, 0x40
je 0x10049935
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x10049d21
movzx eax, byte [edx + 0x3c]
test al, 2
je 0x100498d3
mov eax, 0x2f
mov dword [edx + 0x30], eax
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x18]
mov dword [ecx + 0x34], eax
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x100498c1
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, 0x2f
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebx + 0x12b]
movzx esi, byte [ebx + 0x12c]
mov edx, ecx
and edx, 0x40
mov edi, 2
xor eax, eax
test edx, edx
setne al
test ecx, 0x80
jne 0x100498ff
mov edi, 0
test esi, 1
mov edx, 4
jne 0x10049911
mov edx, 0
or eax, edi
or eax, edx
mov edx, 0x2f
push edx
push edx
push eax
push 0xffffffffffffffff
push ebx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebx + 0x12a]
test al, 0x40
je 0x100499f4
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x10049d40
movzx eax, byte [edx + 0x3c]
test al, 2
je 0x10049992
mov dword [edx + 0x30], 0x101
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x18]
mov dword [edx + 0x34], 0x1f
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x64]
test eax, eax
je 0x10049980
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, 0x101
mov esp, ebp
pop ebp
ret
push 0x1f
push 0x101
movzx ecx, byte [ebx + 0x12b]
movzx esi, byte [ebx + 0x12c]
mov edx, ecx
and edx, 0x40
mov edi, 2
xor eax, eax
test edx, edx
setne al
test ecx, 0x80
mov edx, 4
jne 0x100499ca
mov edi, 0
test esi, 1
jne 0x100499d7
mov edx, 0
or eax, edi
or eax, edx
push eax
push 0xffffffffffffffff
push ebx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
movzx edx, byte [ebx + 0x12b]
test dl, 8
je 0x10049aaa
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x10049d5f
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x10049a52
mov dword [ecx + 0x30], 0x102
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x18]
mov dword [edx + 0x34], 0x1f
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x64]
test eax, eax
je 0x10049a40
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, 0x102
mov esp, ebp
pop ebp
ret
push 0x1f
push 0x102
mov ecx, edx
and ecx, 0x40
mov esi, 2
mov edi, 4
xor eax, eax
test ecx, ecx
setne al
test edx, 0x80
movzx edx, byte [ebx + 0x12c]
jne 0x10049a83
mov esi, 0
test dl, 1
jne 0x10049a8d
mov edi, 0
or eax, esi
or eax, edi
push eax
push 0xffffffffffffffff
push ebx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
test dl, 4
jne 0x10049b56
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x10049d7e
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x10049afe
mov eax, 0x22a
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x34], eax
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x10049aec
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, 0x22a
mov esp, ebp
pop ebp
ret
mov ecx, edx
and ecx, 0x40
mov esi, 2
mov edi, 4
xor eax, eax
test ecx, ecx
setne al
test edx, 0x80
movzx edx, byte [ebx + 0x12c]
jne 0x10049b28
mov esi, 0
test dl, 1
mov edx, 0x22a
push edx
push edx
jne 0x10049b39
mov edi, 0
or eax, esi
or eax, edi
push eax
push 0xffffffffffffffff
push ebx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x1c], ecx
sub ecx, 1
mov dword [ebp - 0x18], eax
sbb eax, 0
jl 0x10049b9b
mov eax, dword [ebx + 0xa8]
test eax, eax
je 0x10049c3e
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edx
cdq
sub ecx, eax
mov eax, dword [ebp - 0x18]
sbb eax, edx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jl 0x10049c3e
or ecx, dword [ebp - 0x24]
je 0x10049c3e
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x10049d9d
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x10049be6
mov eax, 0x19
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x34], eax
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x10049bd4
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, 0x19
mov esp, ebp
pop ebp
ret
mov ecx, edx
and ecx, 0x40
mov esi, 2
mov edi, 4
xor eax, eax
test ecx, ecx
setne al
test edx, 0x80
movzx edx, byte [ebx + 0x12c]
jne 0x10049c10
mov esi, 0
test dl, 1
mov edx, 0x19
push edx
push edx
jne 0x10049c21
mov edi, 0
or eax, esi
or eax, edi
push eax
push 0xffffffffffffffff
push ebx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebx + 0x12d]
test al, 1
je 0x10049c91
mov edx, dword [ebx + 0x90]
mov ecx, dword [ebx + 0x94]
mov dword [ebp - 0x24], ecx
mov eax, edx
add eax, 0xffffffff
adc ecx, 0xffffffff
neg eax
neg ecx
add eax, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x18]
or eax, ecx
jne 0x10049c7c
mov eax, dword [ebx + 0xc0]
sub dword [ebx + 0x40], eax
mov ebx, dword [ebp - 0x14]
jmp 0x10049c91
mov eax, dword [ebp - 0x24]
neg edx
add edx, dword [ebp - 0x1c]
neg eax
add eax, dword [ebp - 0x18]
or edx, eax
jne 0x10049dbc
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [ebx + 0x90], eax
mov dword [ebx + 0x94], edx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x40]
test eax, eax
je 0x10049f12
movzx ecx, byte [edx + 0x128]
test cl, 1
je 0x10049cd9
movzx ecx, byte [edx + 0x12b]
test cl, 4
je 0x10049cd9
movsx ecx, byte [edx + 0x11d]
cmp ecx, 2
je 0x10049f04
mov dword [edx + 0x3c], eax
mov edx, dword [ebp - 0x14]
add eax, dword [edx + 0xc0]
mov dword [edx + 0x44], eax
mov eax, dword [ebp - 0x14]
and byte [eax + 0x12f], 0xef
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
and byte [ecx + 0x12f], 0xf7
mov ebx, dword [ebp - 0x14]
push eax
or byte [ebx + 0x12f], 4
push esi
push edi
call sym.libifcoremd.dll_for_write_dir_xmit
add esp, 0xc
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push ebx
mov eax, 0x2f
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push ebx
push 0x1f
push 0x101
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push ebx
push 0x1f
push 0x102
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push ebx
mov eax, 0x22a
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push ebx
mov eax, 0x19
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x24]
push 0
push eax
mov ecx, dword [ebx + 0x38]
mov edx, dword [ebx + 0x40]
sub edx, ecx
push edx
push ecx
push dword [ebx + 0xb4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10049efa
mov ecx, dword [ebx + 0x38]
mov edx, dword [ebx + 0xc0]
and byte [ebx + 0x12d], 0xfe
mov dword [ebx + 0x40], ecx
add ecx, edx
mov dword [ebx + 0x44], ecx
xor edx, edx
mov dword [ebx + 0xa0], edx
mov dword [ebx + 0xa4], edx
cmp eax, 0xffffffff
je 0x10049e1f
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
jmp 0x10049c91
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0xb8], eax
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x18]
test ecx, ecx
je 0x10049edb
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x10049e79
mov eax, 0x26
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x34], eax
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x10049e67
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
movzx ebx, byte [edx + 0x12b]
movzx esi, byte [edx + 0x12c]
mov ecx, ebx
and ecx, 0x40
mov edi, 2
xor eax, eax
test ecx, ecx
setne al
test ebx, 0x80
jne 0x10049ea5
mov edi, 0
test esi, 1
mov ecx, 4
jne 0x10049eb7
mov ecx, 0
or eax, edi
or eax, ecx
mov ecx, 0x26
push ecx
push ecx
push eax
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push edx
mov eax, 0x26
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffff
jmp 0x10049de0
lea ecx, [eax + 1]
mov dword [edx + 0x3c], ecx
mov byte [eax], 0x20
jmp 0x10049cdc
mov eax, dword [edx + 0x38]
mov dword [edx + 0x40], eax
mov edx, dword [ebp - 0x14]
jmp 0x10049cb1
movzx edx, byte [ebp + 0x10]
movzx eax, byte [ebx + 0x128]
and eax, 0xfffffffe
and edx, 0xffffff80
shr edx, 7
and edx, 1
or eax, edx
movzx edx, byte [ebp + 0x12]
mov byte [ebx + 0x128], al
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ecx + 0x128]
and eax, 0xfffffffd
movzx ebx, byte [ebp + 0x13]
and edx, 4
shr edx, 2
and edx, 1
add edx, edx
or eax, edx
mov byte [ecx + 0x128], al
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ecx + 0x128]
and ebx, 8
shr ebx, 3
and ebx, 1
and eax, 0xfffffffb
mov edx, ebx
shl edx, 2
or eax, edx
movzx edx, byte [ebp + 0x13]
mov byte [ecx + 0x128], al
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ecx + 0x128]
and eax, 0xfffffff7
and edx, 4
shr edx, 2
and edx, 1
shl edx, 3
or eax, edx
mov byte [ecx + 0x128], al
mov edx, ebx
shl edx, 5
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ecx + 0x128]
and eax, 0xffffffdf
or eax, edx
movzx edx, byte [ebp + 0x13]
mov byte [ecx + 0x128], al
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ecx + 0x131]
and eax, 0xfffffffe
and edx, 0x10
shr edx, 4
and edx, 1
or eax, edx
mov byte [ecx + 0x131], al
mov edx, dword [ebp - 0x14]
movzx eax, byte [edx + 0x131]
and eax, 0xfffffffd
add ebx, ebx
or eax, ebx
mov byte [edx + 0x131], al
mov ebx, dword [ebp - 0x14]
movzx eax, byte [ebx + 0x128]
and eax, 0xffffffbf
movzx edx, byte [ebp + 0x13]
and edx, 0x20
shr edx, 5
and edx, 1
mov ecx, edx
shl ecx, 6
or eax, ecx
mov byte [ebx + 0x128], al
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x18]
movzx eax, byte [ecx + 0x128]
and eax, 0x7f
shl edx, 7
or eax, edx
mov byte [ecx + 0x128], al
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ecx + 0x129]
and eax, 0xfffffffe
mov edx, ebx
and edx, 1
or eax, edx
mov byte [ecx + 0x129], al
mov eax, ebx
and eax, 2
mov edx, dword [ebp - 0x14]
movzx ecx, byte [edx + 0x131]
and ecx, 0xfffffff7
shr eax, 1
and eax, 1
shl eax, 3
or ecx, eax
mov byte [edx + 0x131], cl
mov eax, dword [ebp - 0x14]
movzx edx, byte [eax + 0x129]
and edx, 0xfffffff9
and ebx, 0xc
shr ebx, 2
and ebx, 3
add ebx, ebx
or edx, ebx
movzx ebx, byte [ebp + 0x12]
mov byte [eax + 0x129], dl
movsx eax, byte [ebp + 0x11]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
movzx eax, byte [ecx + 0x12d]
and ebx, 1
and eax, 0xfffffff7
mov edx, ebx
and edx, 1
shl edx, 3
or eax, edx
mov byte [ecx + 0x12d], al
test ebx, ebx
jne 0x1004a0db
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1004a0f1
cmp eax, 0xffffffff
je 0x1004a0f1
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
or byte [eax + 0x12d], 4
mov ecx, dword [ebp - 0x14]
mov byte [ecx + 0x120], dl
mov eax, 2
push eax
push 4
push eax
push dword [ebp - 0x14]
call fcn.1002b098
add esp, 0x10
test eax, eax
je 0x1004a1af
mov edx, dword [ebp - 0x14]
mov ebx, dword [edx + 0x18]
test ebx, ebx
je 0x1004a1be
movzx ecx, byte [ebx + 0x3c]
test cl, 2
je 0x1004a152
mov dword [ebx + 0x30], eax
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x18]
mov dword [ecx + 0x34], eax
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebx + 0x64]
test edx, edx
je 0x1004a145
xor ecx, ecx
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x64], ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push eax
push eax
movzx esi, byte [edx + 0x12b]
movzx edi, byte [edx + 0x12c]
mov ebx, esi
and ebx, 0x40
xor ecx, ecx
test ebx, ebx
setne cl
test esi, 0x80
mov ebx, 2
jne 0x1004a180
mov ebx, 0
test edi, 1
mov esi, 4
jne 0x1004a192
mov esi, 0
or ecx, ebx
or ecx, esi
push ecx
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x14]
movzx eax, byte [ebx + 0x129]
jmp 0x10049880
push edx
push eax
push eax
push 2
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret