Function at 0x420380
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x2034
call fcn.00466d30
mov eax, dword [0x4bc4a0]
xor eax, esp
mov dword [esp + 0x2030], eax
push ebx
push ebp
mov ebp, dword [esp + 0x2040]
cmp dword [ebp + 0xc58], 0
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
je 0x4203ee
lea esi, [ebp + 0xa1c]
push esi
call edi
mov eax, dword [ebp + 0xa14]
mov ecx, dword [ebp + 0xa18]
mov edx, dword [ebp + 0xc58]
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
add eax, eax
push eax
mov eax, dword [edx + 0x24c]
push ecx
push eax
call fcn.004669c0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ebx, [ebp + 0x10c]
mov eax, ebx
mov dword [esp + 0x18], ebx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x420400
sub eax, edx
je 0x42070b
xor eax, eax
push 0x1fff
mov byte [esp + 0x24], cl
push eax
lea ecx, [esp + 0x49]
push ecx
mov dword [esp + 0x2d], eax
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov dword [esp + 0x39], eax
mov dword [esp + 0x3d], eax
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
mov word [esp + 0x49], ax
mov byte [esp + 0x4b], al
mov byte [esp + 0x4c], al
call fcn.00466720
add esp, 0xc
lea esi, [ebp + 0xa1c]
push esi
mov dword [esp + 0x18], esi
call edi
cmp dword [ebp + 0xa14], 0
mov dword [esp + 0x10], 0
jle 0x4206b9
mov edx, dword [ebp + 0xa18]
xor ebx, ebx
jmp 0x420480
mov ecx, dword [ebx + edx + 4]
push 0xa
lea eax, [esp + 0x24]
push eax
push ecx
call fcn.004688e8
add esp, 0xc
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x420496
lea edi, [esp + 0x40]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4204a6
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x40]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4204c1
mov dx, word [0x49d0d4]
push 0xa
lea eax, [esp + 0x24]
push eax
mov eax, dword [ebp + 0xa18]
mov word [edi], dx
mov ecx, dword [ebx + eax + 0x14]
mov edx, dword [ebx + eax + 0x10]
push ecx
push edx
call fcn.004689c2
add esp, 0x10
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4204f4
lea edi, [esp + 0x40]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x420504
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x40]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x420520
mov ax, word [0x49d0d4]
mov edx, dword [ebp + 0xa18]
push 0xa
lea ecx, [esp + 0x24]
mov word [edi], ax
mov eax, dword [ebx + edx + 0x18]
push ecx
push eax
call fcn.004688e8
add esp, 0xc
mov ecx, eax
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x420550
lea edi, [esp + 0x40]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x420560
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x40]
dec edi
jmp 0x420580
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x420580
mov cx, word [0x49d0d4]
mov eax, dword [ebp + 0xa18]
push 0xa
lea edx, [esp + 0x24]
mov word [edi], cx
mov ecx, dword [ebx + eax + 0x1c]
push edx
push ecx
call fcn.004688e8
add esp, 0xc
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4205b0
lea edi, [esp + 0x40]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4205c0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x40]
dec edi
jmp 0x4205e0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4205e0
mov dx, word [0x49d0d4]
mov ecx, dword [ebp + 0xa18]
push 0x10
lea eax, [esp + 0x24]
mov word [edi], dx
mov edx, dword [ebx + ecx + 0xc]
push eax
push edx
call fcn.004688e8
add esp, 0xc
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x420610
lea edi, [esp + 0x40]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x420620
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x40]
dec edi
jmp 0x420640
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x420640
mov ax, word [0x49d0d4]
mov edx, dword [ebp + 0xa18]
mov word [edi], ax
lea eax, [esp + 0x40]
dec eax
cmp byte [ebx + edx + 0x20], 0
je 0x420680
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x420663
mov ecx, dword [str.1_r_n]
mov dword [eax], ecx
mov cl, byte [0x49e2b4]
jmp 0x420696
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x420680
mov ecx, dword [str.0_r_n]
mov dword [eax], ecx
mov cl, byte [0x49e2ac]
mov byte [eax + 4], cl
mov eax, dword [esp + 0x10]
inc eax
add ebx, 0x28
cmp eax, dword [ebp + 0xa14]
mov dword [esp + 0x10], eax
jl 0x420480
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x42070b
lea eax, [esp + 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4206e7
sub eax, edx
push 0
lea edx, [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x4c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x2040]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00466555
add esp, 0x2034
ret