Function at 0x51d940
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x778b6b
mov eax, dword fs:[0]
push eax
sub esp, 0x390
mov eax, dword [0x84dea4]
xor eax, esp
mov dword [esp + 0x38c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x84dea4]
xor eax, esp
push eax
lea eax, [esp + 0x3a4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3b4]
mov esi, dword [esp + 0x3b8]
mov ebx, ecx
mov ecx, 9
lea edi, [esp + 0x40]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], eax
rep movsd dword es:[edi], dword [esi]
call fcn.004ba3a0
xor ebp, ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov esi, dword [esp + 0x3bc]
mov ecx, 0xc
lea edi, [esp + 0x64]
xor eax, eax
mov dword [esp + 0x3ac], ebp
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x24], eax
jmp 0x51d9e6
mov ebx, dword [esp + 0x18]
xor ebp, ebp
xor ecx, ecx
cmp eax, 1
sete cl
mov edi, ecx
cmp edi, ebp
mov dword [esp + 0x3c], edi
je 0x51da0f
or dword [esp + 0x48], 0x80
mov eax, 0x7ba33c
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], eax
jmp 0x51da2e
and dword [esp + 0x48], 0xffffff7f
mov eax, 0x7ba33c
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], eax
jmp 0x51da2e
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x18]
mov esi, dword [eax]
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], esi
call fcn.005f50d0
mov eax, dword [esp + 0x30]
test eax, eax
mov ebp, eax
je 0x51dbc6
cmp dword [esp + 0x14], 0
jne 0x51da94
test edi, edi
mov ecx, str.WESTRING_CAMPAIGN
jne 0x51da64
mov ecx, str.WESTRING_MELEE
push 0
push 0x104
lea edx, [esp + 0x1a0]
call fcn.004da2f0
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x198]
push edx
push 0xffff
push eax
mov ecx, ebx
call fcn.0051c720
mov dword [esp + 0x14], eax
push 0x104
lea edx, [esp + 0x19c]
mov ecx, esi
call fcn.0051c420
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x198]
push ecx
push 0xffff
push edx
mov ecx, ebx
call fcn.0051c720
mov ebx, eax
xor eax, eax
cmp esi, 3
sete al
xor edi, edi
test ebp, ebp
mov dword [esp + 0x78], eax
jle 0x51dbc6
jmp 0x51dae0
mov ecx, dword [esp + 0x34]
mov esi, dword [ecx + edi*4]
cmp esi, 0x524e4475
ja 0x51db27
je 0x51daff
mov eax, esi
sub eax, 0x524e4462
je 0x51daff
sub eax, 7
jne 0x51db2f
push 0x104
lea edx, [esp + 0x98]
mov ecx, esi
call fcn.005e85a0
push 0x104
lea edx, [esp + 0x2a0]
mov ecx, esi
call fcn.005e85e0
jmp 0x51db95
cmp esi, 0x636f6c73
je 0x51db5f
mov ecx, dword [esp + 0x1c]
push 0x104
lea edx, [esp + 0x98]
push edx
push esi
call fcn.004ec8b0
mov ecx, dword [esp + 0x1c]
push 0x104
lea eax, [esp + 0x2a0]
push eax
push esi
call fcn.004ed7c0
jmp 0x51db95
push 0
push 0x104
lea ecx, [esp + 0x9c]
push ecx
mov edx, str.StartLocationIcon
mov ecx, str.WorldEditArt
call fcn.004b8a70
push 0
push 0x104
lea edx, [esp + 0x2a4]
mov ecx, str.WESTRING_STARTLOCATION
call fcn.004da2f0
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x2a4]
push ecx
mov ecx, dword [esp + 0x24]
push ebx
mov dword [esp + 0x80], esi
call fcn.0051cfd0
add edi, 1
cmp edi, ebp
jl 0x51dae0
mov eax, dword [esp + 0x20]
add eax, 4
cmp eax, str.WESTRING_UTYPE_CUSTOM
mov dword [esp + 0x20], eax
jl 0x51da26
mov eax, dword [esp + 0x24]
add eax, 1
cmp eax, 2
mov dword [esp + 0x24], eax
jl 0x51d9e0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x51dc07
push 0
push 0xfffffffffffffffe
push 0x829be4
push eax
call sub.Storm.dll_Ordinal_403
mov ecx, dword [esp + 0x3a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x38c]
xor ecx, esp
call fcn.00735f58
add esp, 0x39c
ret 0xc