Function at 0x46b440
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4df480
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x527f10]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x14]
mov esi, ecx
mov dword [ebp - 0x40], eax
push ecx
mov dword [ebp - 4], 0
mov ebx, esp
mov dword [ebp - 0x48], esp
mov dword [ebp - 0x3c], ebx
call fcn.004ad3ae
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46b49c
push 0x80004005
call fcn.00422000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 1
test esi, esi
je 0x46b4d2
test esi, 0xffff0000
jne 0x46b4d6
movzx esi, si
push esi
call fcn.004b5332
test eax, eax
je 0x46b4e8
push esi
push eax
mov ecx, ebx
call fcn.00424e5c
jmp 0x46b4e8
xor eax, eax
jmp 0x46b4df
push esi
call fcn.004bbaea
add esp, 4
push eax
push esi
mov ecx, ebx
call fcn.004253df
mov byte [ebp - 4], 2
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x3c], esp
mov esi, esp
push eax
call fcn.00425450
add eax, 0x10
add esp, 4
mov dword [esi], eax
push edi
mov byte [ebp - 4], 0
call fcn.0046b1d0
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 0xc
push 0
lea ecx, [ebp - 0x44]
push ecx
push 2
push 0x4f02cc
push edi
call ebx
mov ecx, dword [ebp + 0xc]
mov eax, ecx
sub eax, 1
je 0x46b70f
sub eax, 3
je 0x46b681
push ecx
push str.hex__x_:
lea edx, [ebp - 0x38]
push 0x14
push edx
call fcn.004be7e1
lea eax, [ebp - 0x38]
add esp, 0x10
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46b560
sub eax, edx
push 0
sar eax, 1
lea ecx, [ebp - 0x44]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [ebp - 0x38]
push eax
push edi
call ebx
cmp dword [ebp + 0x10], 0
jbe 0x46b676
mov ebx, 1
call fcn.004ad3ae
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x46b492
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x40]
movzx edx, byte [ecx + ebx - 1]
push edx
lea eax, [ebp - 0x3c]
push str._02x
push eax
call fcn.0042262f
add esp, 0xc
cmp ebx, dword [ebp + 0x10]
jae 0x46b61a
push 0x4f18bc
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x48]
push edx
call fcn.00424a46
add esp, 0xc
push eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
call fcn.00424eea
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46b61a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x3c]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46b622
sub eax, edx
push 0
sar eax, 1
lea ecx, [ebp - 0x44]
push ecx
lea edx, [eax + eax]
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46b663
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc ebx
lea ecx, [ebx - 1]
cmp ecx, dword [ebp + 0x10]
jb 0x46b58f
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 0x44]
push edx
jmp 0x46b76c
call fcn.004ad3ae
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46b69b
push 0x80004005
call fcn.00422000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
lea eax, [ebp - 0x3c]
push 0x5054b8
push eax
call fcn.0042262f
mov esi, dword [ebp - 0x3c]
mov eax, esi
add esp, 0xc
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46b6d0
sub eax, edx
push 0
sar eax, 1
lea ecx, [ebp - 0x44]
push ecx
lea edx, [eax + eax]
push edx
push esi
push edi
call ebx
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46b776
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x46b776
cmp dword [ebp + 0x10], 0
push ecx
mov ecx, esp
jbe 0x46b72e
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x3c], esp
push edx
call fcn.004247f7
push ecx
mov byte [ebp - 4], 3
mov dword [ebp - 0x40], esp
jmp 0x46b743
mov dword [ebp - 0x40], esp
push 0x4eea54
call fcn.004247f7
push ecx
mov byte [ebp - 4], 4
mov dword [ebp - 0x3c], esp
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.00425450
add eax, 0x10
add esp, 4
mov dword [esi], eax
push edi
mov byte [ebp - 4], 0
call fcn.0046b1d0
add esp, 0xc
push 0
lea eax, [ebp - 0x44]
push eax
push 4
push 0x4f193c
push edi
call ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46b79c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bb182
mov esp, ebp
pop ebp
ret